package com.twu.commandSetup;

import com.twu.driver.Driver;

/**
 * Created by thoughtworks on 4/8/14.
 */
public enum LibraryOperation {
    EXIT {
        @Override
        public void execute(Driver operations) {

        }

        @Override
        public String getOperationString() {
            return "Exit";
        }
    },
    CHECKOUT_BOOK{

        @Override
        public void execute(Driver operations) {
            operations.checkOutBook();
        }

        @Override
        public String getOperationString() {
            return "Checkout books";
        }
    },
    CHECKOUT_MOVIE{
        @Override
        public void execute(Driver driver) {
            driver.checkOutMovies();
        }

        @Override
        public String getOperationString() {
            return "Checkout movies";
        }

    },
    RETURN_BOOK{
        @Override
        public void execute(Driver driver) {
            driver.returnBook();
        }

        @Override
        public String getOperationString() {
            return "Return books";
        }

    },
    RETURN_MOVIE{
        @Override
        public void execute(Driver driver) {
            driver.returnMovies();
        }

        @Override
        public String getOperationString() {
            return "Return movies";
        }
    },
    USER_INFO{
        @Override
        public void execute(Driver driver) {
            driver.displayUserInfo();
        }

        @Override
        public String getOperationString() {
            return "Display user info";
        }
    };

    private String operationString;


    abstract public void execute(Driver driver);
    public abstract String getOperationString();
}
